#include "Buffer.h"
#include "graphics/GLUniformBlocks.h"
using namespace Umikaze::Core;

Buffer::Buffer() { _ubo = GlUniformBocks::instance()->genBuffer(); }

Buffer::~Buffer() { GlUniformBocks::instance()->deleteBuffer(_ubo); }

void Buffer::set(void *data, uint32_t size) {
  auto &uniform = GlUniformBocks::instance();
  uniform->updateBuffer(_ubo, data, size);
}